-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NaNs for some dbFS value displays (-∞ dbFS) #7142
Fix NaNs for some dbFS value displays (-∞ dbFS) #7142
Conversation
Fix some NaNs in the context of the display of dbFS values. They occur during the display of the current value when a mixer fader or the volume knob of an instrument is pulled down completely. The fix is to detect these cases and to display "-∞ dbFS". Also fix a problem with the editor where dbFS values can be entered for volume knobs. When the knob is turned completely to the left and the amplification is 0 then the initially displayed value is set to -96 dBFS, i.e. the lower limit that is shown in the dialog. This is done because the dialog likely cannot handle displaying or entering "-∞".
We might want to try consolidating this and #7039 to something consistent and fix the volume slider labels once and for all. |
Decrease code repetition even more by applying Veratil's suggestion from a code review.
Is this a proper fix? Why would it ever display NaN in the first place? |
@sakertooth, it is a proper fix. It displays NaN if you call This is fixed with this PR by adding a check and displaying -inf in this case. |
Hm, I wonder how it's working then. Does Qt convert the specific NaN to the Anyway, the previous code definitively resulted in NaNs which you can reproduce if you compile with |
@Veratil, @sakertooth, can I merge this? |
Fix some NaNs in the context of the display of dbFS values when "View > Volume as dbFS" is checked. They occur during the display of the current value when a mixer fader or the volume knob of an instrument is pulled down completely. The fix is to detect these cases and to display "-∞ dbFS". Also fix a problem with the editor where dbFS values can be entered for volume knobs. When the knob is turned completely to the left and the amplification is 0 then the initially displayed value is set to -96 dBFS, i.e. the lower limit that is shown in the dialog. This is done because the dialog likely cannot handle displaying or entering "-∞".
Fix some NaNs in the context of the display of dbFS values. They occur during the display of the current value when a mixer fader or the volume knob of an instrument is pulled down completely.
The fix is to detect these cases and to display "-∞ dbFS":
Also fix a problem with the editor where dbFS values can be entered for volume knobs. When the knob is turned completely to the left and the amplification is 0 then the initially displayed value is set to -96 dBFS, i.e. the lower limit that is shown in the dialog. This is done because the dialog likely cannot handle displaying or entering "-∞".